/*

Copyright 2012 Shadowmist Ltd.

This file is part of Shadow MVCC for Oracle Coherence.

Shadow MVCC for Oracle Coherence is free software: you can redistribute 
it and/or modify it under the terms of the GNU General Public License 
as published by the Free Software Foundation, either version 3 of the 
License, or (at your option) any later version.

Shadow MVCC for Oracle Coherence is distributed in the hope that it 
will be useful, but WITHOUT ANY WARRANTY; without even the implied 
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See 
the GNU General Public License for more details.
                        
You should have received a copy of the GNU General Public License
along with Shadow MVCC for Oracle Coherence.  If not, see 
<http://www.gnu.org/licenses/>.

*/

package com.shadowmvcc.coherence.processor;

import java.util.Map;

/**
 * Interface that an {@code EntryProcessor} may implement in order to
 * restore some of the functionality lost by the MVCC framwork's
 * loack of support for the {@code processAll} method.
 * 
 * @author David Whitmarsh <david.whitmarsh@sixwhits.com>
 *
 */
public interface Reducer {
    
    /**
     * Take the map of results generated by an {@code EntryProcessor}
     * and return a, possibly reduced, replacement map.
     * @param processorResults the original results
     * @return a modified result map
     */
    @SuppressWarnings("rawtypes")
    Map reduce(Map processorResults);

}
